<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_mult')); ?>
<div class="content">
    <div id="content-header">
        <?php echo $breadcrumb->trail(' &raquo; '); ?>
    </div>
    <div id="content-left">
        <?php
        define(x, 587);
        define(y, 760);
        echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), x, y, 'hspace="5" vspace="5"') . '<br></a>';
        ?>
    </div>
    <div id="content-right">
        <div id="product-general">
            <div id="product-name"><h1><?php echo $products_name; ?></h1></div>
            <div id="product-description"><?php echo stripslashes($product_info['products_description']); ?></div>
            <div id="price"><?php echo $currencies->display_price($product_info['products_price'], tep_get_tax_rate($products['products_tax_class_id']));?></div>
        </div>
        <div id="product-detail">
            <div id="product-attributes">
                <?php
                $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int) $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $languages_id . "'");
                $products_attributes = tep_db_fetch_array($products_attributes_query);
                if ($products_attributes['total'] > 0) {
                ?>
                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
                        <tr>
                            <td class="main" align="center"><?php echo TEXT_PRODUCT_OPTION; ?></td>
                            <td class="main" align="center"><?php /*  uncomment if you want to show the model number echo TEXT_PRODUCT_MODEL; */ ?></td>
                            <td class="main" align="center"><?php echo TEXT_PRODUCT_PRICE; ?></td>
                            <td class="main" align="center"><?php echo TEXT_PRODUCT_QUANTITY; ?></td>
                        </tr>
                    <?php
                    $X = 0;
                    $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int) $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $languages_id . "' order by popt.products_options_name");
                    while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
                        $products_options_array = array();
                        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int) $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int) $languages_id . "'");
                        while ($products_options = tep_db_fetch_array($products_options_query)) {
                            $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
                            if ($products_options['options_values_price'] != '0') {
                                $products_options_array[sizeof($products_options_array) - 1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ') ';

                                if ($products_options['price_prefix'] == '+') {
                                    $price_with_attribute = ($product_info['products_price'] + $products_options['options_values_price']);
                                } else {
                                    $price_with_attribute = ($product_info['products_price'] - $products_options['options_values_price']);
                                }
                    ?>
                                <tr>
                                    <td class="main" align="center">
                            <?php
                                echo $products_options['products_options_values_name'];
                                echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']);
                                echo tep_draw_hidden_field('b[]', $products_options_name['products_options_id']);
                            ?>	      </td>
                            <td class="main" align="center">
                            <?php /* uncomment if you want to show the model number
                                  echo $product_info['products_model']; */ ?>
                            </td>
                            <td class="main" align="center"><?php echo $currencies->display_price($price_with_attribute, tep_get_tax_rate($product_info['products_tax_class_id'])); ?></td>
                            <td class="main" align="center"><?php echo tep_draw_input_field('quantity[]', $value = '0', "size=2"); ?></td>
                        </tr>
                    <?php
                                $x++;
                            }
                        }

                        if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
                            $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
                        } else {
                            $selected_attribute = false;
                        }
                        /* ?>
                          <tr>
                          <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
                          <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
                          </tr>
                          <?php */
                    }
                    ?>
                </table>
                <?php
                }
                ?>
            </div>
            <div id="product-amount">
                Tổng cộng: <?php echo $currencies->display_price($product_info['products_price'], tep_get_tax_rate($products['products_tax_class_id']));?> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
            </div>
        </div>
        <div id="tabbed-pane">
            <ul class="tab">
                <li class="tab-one"><a href="#featured" class="current">Phụ kiện đi kèm</a></li>
                <li class="tab-two"><a href="#core">Quần cùng tông</a></li>
            </ul>
            <div class="list-wrap">
                <ul id="featured">
                    <li><div class="related-product first-related-product">
                            <div class="outer">
                                <div class="related-product-general">
                                    <table>
                                        <tr><td colspan="2" class="product-name">T-Shirt Eagle (Black)</td></tr>
                                        <tr><td>Giá</td><td>31.000VND</td></tr>
                                        <tr><td>Tình trạng:</td><td>Còn không không biết</td></tr>
                                    </table>
                                </div>
                            </div>
                            <div class="related-product-image">
                                <img src="./pub/images/images/medium_black_01.gif" width="79px" height="103px"/>
                            </div>
                        </div></li>
                     <li><div class="related-product">
                            <div class="outer last-outer">
                                <div class="related-product-general">
                                    <table>
                                        <tr><td colspan="2" class="product-name">T-Shirt Eagle (Black)</td></tr>
                                        <tr><td>Giá</td><td>31.000VND</td></tr>
                                        <tr><td>Tình trạng:</td><td>Còn không không biết</td></tr>
                                    </table>
                                </div>
                            </div>
                            <div class="related-product-image">
                                <img src="./pub/images/images/medium_black_01.gif" width="79px" height="103px"/>
                            </div>
                        </div></li>
                </ul>
                <ul id="core" class="hide">
                    <li><div class="related-product first-related-product">
                            <div class="outer">
                                <div class="related-product-general">
                                    <table>
                                        <tr><td colspan="2" class="product-name">T-Shirt Eagle (Black)</td></tr>
                                        <tr><td>Giá</td><td>31.000VND</td></tr>
                                        <tr><td>Tình trạng:</td><td>Còn không không biết</td></tr>
                                    </table>
                                </div>
                            </div>
                            <div class="related-product-image">
                                <img src="./pub/images/images/medium_black_01.gif" width="79px" height="103px"/>
                            </div>
                        </div></li>
                        <li><div class="related-product">
                            <div class="outer last-outer">
                                <div class="related-product-general">
                                    <table>
                                        <tr><td colspan="2" class="product-name">T-Shirt Eagle (Black)</td></tr>
                                        <tr><td>Giá</td><td>31.000VND</td></tr>
                                        <tr><td>Tình trạng:</td><td>Còn không không biết</td></tr>
                                    </table>
                                </div>
                            </div>
                            <div class="related-product-image">
                                <img src="./pub/images/images/medium_black_01.gif" width="79px" height="103px"/>
                            </div>
                        </div></li>
                </ul>
                <div id="read-more""><a href="">Xem thêm...</a></div>
            </div> <!-- END List Wrap -->
        </div> <!-- END Organic Tabs (Example One) -->

    </div>
    <div id="content-footer">
        <?php include("optional_related_products.php"); ?>
    </div>
    <div class="seperator2"></div>
    <?php include("contact_info.php"); ?>
</div>